using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebFoundation;

namespace MHI.InspectionManager.Interfaces
{
	/// <summary>
	/// DevInspectionstepT,table entity:dev_inspectionstep_t 
	/// </summary>
	public class DevInspectionstepT
	{
		public static readonly string KeyId;
		public static readonly string KeyInspectionpointId;
		public static readonly string KeyDeviceId;
		public static readonly string KeyStepInfo;
		public static readonly string KeyStepResult;
		public static readonly string KeyStepOrder;
		public static readonly string KeyGmtCreated;
		public static readonly string KeyPersonModified;
		public static readonly string KeyGmtModified;
		public static readonly string KeyStateInfo;
		public static readonly string KeyIsUse;
		public static readonly string KeyVersion;
		

		static DevInspectionstepT()
		{
			KeyId = ExpressionHelper.GetPropertyName<DevInspectionstepT>(r => r.Id);
			KeyInspectionpointId = ExpressionHelper.GetPropertyName<DevInspectionstepT>(r => r.InspectionpointId);
			KeyDeviceId = ExpressionHelper.GetPropertyName<DevInspectionstepT>(r => r.DeviceId);
			KeyStepInfo = ExpressionHelper.GetPropertyName<DevInspectionstepT>(r => r.StepInfo);
			KeyStepResult = ExpressionHelper.GetPropertyName<DevInspectionstepT>(r => r.StepResult);
			KeyStepOrder = ExpressionHelper.GetPropertyName<DevInspectionstepT>(r => r.StepOrder);
			KeyGmtCreated = ExpressionHelper.GetPropertyName<DevInspectionstepT>(r => r.GmtCreated);
			KeyPersonModified = ExpressionHelper.GetPropertyName<DevInspectionstepT>(r => r.PersonModified);
			KeyGmtModified = ExpressionHelper.GetPropertyName<DevInspectionstepT>(r => r.GmtModified);
			KeyStateInfo = ExpressionHelper.GetPropertyName<DevInspectionstepT>(r => r.StateInfo);
			KeyIsUse = ExpressionHelper.GetPropertyName<DevInspectionstepT>(r => r.IsUse);
			KeyVersion = ExpressionHelper.GetPropertyName<DevInspectionstepT>(r => r.Version);
		}
		

		private long _id; 
		private long? _inspectionpointId; 
		private long? _deviceId; 
		private string _stepInfo; 
		private string _stepResult; 
		private byte? _stepOrder; 
		private DateTime? _gmtCreated; 
		private string _personModified; 
		private DateTime? _gmtModified; 
		private float? _stateInfo; 
		private int _isUse; 
		private long _version; 
		

		/// <summary>
		///  Id, column: id required
		/// </summary>
		[DisplayName("编码")]
		[Required]
		public long Id
		{
			get{ return _id; }
			set
			{
				if(_id != value)
				{
					_id = value;
					NotifyOfChange(KeyId);
				}
			}
		}

		/// <summary>
		///  InspectionpointId, column: inspectionpoint_id 
		/// </summary>
		[DisplayName(" 巡检点")]
		public long? InspectionpointId
		{
			get{ return _inspectionpointId; }
			set
			{
				if(_inspectionpointId != value)
				{
					_inspectionpointId = value;
					NotifyOfChange(KeyInspectionpointId);
				}
			}
		}

		/// <summary>
		///  DeviceId, column: device_id 
		/// </summary>
		[DisplayName(" 设备ID")]
		public long? DeviceId
		{
			get{ return _deviceId; }
			set
			{
				if(_deviceId != value)
				{
					_deviceId = value;
					NotifyOfChange(KeyDeviceId);
				}
			}
		}

		/// <summary>
		///  StepInfo, column: step_info 
		/// </summary>
		[DisplayName(" 步骤内容")]
		public string StepInfo
		{
			get{ return _stepInfo; }
			set
			{
				if(_stepInfo != value)
				{
					_stepInfo = value;
					NotifyOfChange(KeyStepInfo);
				}
			}
		}

		/// <summary>
		///  StepResult, column: step_result 
		/// </summary>
		[DisplayName(" 步骤结果")]
		public string StepResult
		{
			get{ return _stepResult; }
			set
			{
				if(_stepResult != value)
				{
					_stepResult = value;
					NotifyOfChange(KeyStepResult);
				}
			}
		}

		/// <summary>
		///  StepOrder, column: step_order 
		/// </summary>
		[DisplayName(" 步骤序号 记录顺序")]
		public byte? StepOrder
		{
			get{ return _stepOrder; }
			set
			{
				if(_stepOrder != value)
				{
					_stepOrder = value;
					NotifyOfChange(KeyStepOrder);
				}
			}
		}

		/// <summary>
		///  GmtCreated, column: gmt_created 
		/// </summary>
		[DisplayName(" 创建时间")]
		public DateTime? GmtCreated
		{
			get{ return _gmtCreated; }
			set
			{
				if(_gmtCreated != value)
				{
					_gmtCreated = value;
					NotifyOfChange(KeyGmtCreated);
				}
			}
		}

		/// <summary>
		///  PersonModified, column: person_modified 
		/// </summary>
		[DisplayName(" 更新人")]
		public string PersonModified
		{
			get{ return _personModified; }
			set
			{
				if(_personModified != value)
				{
					_personModified = value;
					NotifyOfChange(KeyPersonModified);
				}
			}
		}

		/// <summary>
		///  GmtModified, column: gmt_modified 
		/// </summary>
		[DisplayName(" 更新时间")]
		public DateTime? GmtModified
		{
			get{ return _gmtModified; }
			set
			{
				if(_gmtModified != value)
				{
					_gmtModified = value;
					NotifyOfChange(KeyGmtModified);
				}
			}
		}

		/// <summary>
		///  StateInfo, column: state_info 
		/// </summary>
		[DisplayName("标识状态")]
		public float? StateInfo
		{
			get{ return _stateInfo; }
			set
			{
				if(_stateInfo != value)
				{
					_stateInfo = value;
					NotifyOfChange(KeyStateInfo);
				}
			}
		}

		/// <summary>
		///  IsUse, column: is_use 
		/// </summary>
		[DisplayName("是否可用")]
		[Required]
		public int IsUse
		{
			get{ return _isUse; }
			set
			{
				if(_isUse != value)
				{
					_isUse = value;
					NotifyOfChange(KeyIsUse);
				}
			}
		}

		/// <summary>
		///  Version, column: version 
		/// </summary>
		[DisplayName("版本")]
		[Required]
		public long Version
		{
			get{ return _version; }
			set
			{
				if(_version != value)
				{
					_version = value;
					NotifyOfChange(KeyVersion);
				}
			}
		}

		public event PropertyChangedEventHandler PropertyChanged;

		private void NotifyOfChange(string propertyName)
		{
			if (this.PropertyChanged != null)
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
}
